package org.gc.service.naturalZone;

import java.util.List;

import org.gc.common.entity.naturalZone.NaturalZone;
import org.gc.common.vo.naturalZone.NaturalZoneVO;
import org.gc.dao.naturalZone.NaturalZoneDao;
import org.gc.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class NaturalZoneServiceImpl extends BaseServiceImpl<NaturalZone, NaturalZoneVO, Long> implements NaturalZoneService {
    private NaturalZoneDao naturalZoneDao;
    
    @Autowired
    public void setNaturalZoneDao(NaturalZoneDao naturalZoneDao) {
        this.naturalZoneDao = naturalZoneDao;
    }

    @Override
    public void afterConstruct() {
        super.setBaseDao(naturalZoneDao);
        super.setEntityClass(NaturalZone.class);
        super.setEntityVOClass(NaturalZoneVO.class);

    }

    public List<NaturalZoneVO> getDirectChildren(Long id){
        List<NaturalZoneVO> result = null;
        result = super.getListBy("parent", id);
        return result;
    }

}
